package PMIRPSystem;


/**
 * Generated from IDL interface "PMIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class PMIRPPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, PMIRPSystem.PMIRPOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "suspend_measurement_job", new java.lang.Integer(0));
		m_opsHash.put ( "resume_measurement_job", new java.lang.Integer(1));
		m_opsHash.put ( "_get_iRPId", new java.lang.Integer(2));
		m_opsHash.put ( "get_pm_irp_versions", new java.lang.Integer(3));
		m_opsHash.put ( "resume_threshold_monitor", new java.lang.Integer(4));
		m_opsHash.put ( "list_measurement_jobs", new java.lang.Integer(5));
		m_opsHash.put ( "delete_threshold_monitor", new java.lang.Integer(6));
		m_opsHash.put ( "stop_measurement_job", new java.lang.Integer(7));
		m_opsHash.put ( "get_pm_irp_operations_profile", new java.lang.Integer(8));
		m_opsHash.put ( "get_pm_irp_notification_profile", new java.lang.Integer(9));
		m_opsHash.put ( "list_threshold_monitors", new java.lang.Integer(10));
		m_opsHash.put ( "create_threshold_monitor", new java.lang.Integer(11));
		m_opsHash.put ( "suspend_threshold_monitor", new java.lang.Integer(12));
		m_opsHash.put ( "create_measurement_job", new java.lang.Integer(13));
	}
	private String[] ids = {"IDL:PMIRPSystem/PMIRP:1.0"};
	public PMIRPSystem.PMIRP _this()
	{
		return PMIRPSystem.PMIRPHelper.narrow(_this_object());
	}
	public PMIRPSystem.PMIRP _this(org.omg.CORBA.ORB orb)
	{
		return PMIRPSystem.PMIRPHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // suspend_measurement_job
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,suspend_measurement_job(_arg0));
			}
			catch(PMIRPSystem.JobAlreadySuspended _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.JobAlreadySuspendedHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.UnknownJob _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownJobHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
			catch(PMIRPSystem.SuspendMeasurementJob _ex3)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.SuspendMeasurementJobHelper.write(_out, _ex3);
			}
				break;
			}
			case 1: // resume_measurement_job
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,resume_measurement_job(_arg0));
			}
			catch(PMIRPSystem.JobIsNotSuspended _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.JobIsNotSuspendedHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.ResumeMeasurementJob _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ResumeMeasurementJobHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.HighWorkLoad _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.HighWorkLoadHelper.write(_out, _ex2);
			}
			catch(PMIRPSystem.UnknownJob _ex3)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownJobHelper.write(_out, _ex3);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex4)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex4);
			}
				break;
			}
			case 2: // _get_iRPId
			{
			_out = handler.createReply();
			_out.write_string(iRPId());
				break;
			}
			case 3: // get_pm_irp_versions
			{
			try
			{
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,get_pm_irp_versions());
			}
			catch(PMIRPSystem.GetPMIRPVersions _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.GetPMIRPVersionsHelper.write(_out, _ex0);
			}
				break;
			}
			case 4: // resume_threshold_monitor
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,resume_threshold_monitor(_arg0));
			}
			catch(PMIRPSystem.UnknownThresholdMonitor _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownThresholdMonitorHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.ThresholdMonitorIsNotSuspended _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ThresholdMonitorIsNotSuspendedHelper.write(_out, _ex2);
			}
			catch(PMIRPSystem.ResumeThresholdMonitor _ex3)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ResumeThresholdMonitorHelper.write(_out, _ex3);
			}
				break;
			}
			case 5: // list_measurement_jobs
			{
			try
			{
				int[] _arg0=PMIRPConstDefs.JobIdListHelper.read(_input);
				PMIRPConstDefs.JobInfoListHolder _arg1= new PMIRPConstDefs.JobInfoListHolder();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,list_measurement_jobs(_arg0,_arg1));
				PMIRPConstDefs.JobInfoListHelper.write(_out,_arg1.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.ListMeasurementJobs _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ListMeasurementJobsHelper.write(_out, _ex1);
			}
				break;
			}
			case 6: // delete_threshold_monitor
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,delete_threshold_monitor(_arg0));
			}
			catch(PMIRPSystem.UnknownThresholdMonitor _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownThresholdMonitorHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.DeleteThresholdMonitor _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.DeleteThresholdMonitorHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 7: // stop_measurement_job
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,stop_measurement_job(_arg0));
			}
			catch(PMIRPSystem.UnknownJob _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownJobHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.StopMeasurementJob _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.StopMeasurementJobHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.JobCannotBeStopped _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.JobCannotBeStoppedHelper.write(_out, _ex2);
			}
				break;
			}
			case 8: // get_pm_irp_operations_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_pm_irp_operations_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.GetPMIRPOperationsProfile _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.GetPMIRPOperationsProfileHelper.write(_out, _ex2);
			}
				break;
			}
			case 9: // get_pm_irp_notification_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_pm_irp_notification_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.GetPMIRPNotificationProfile _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.GetPMIRPNotificationProfileHelper.write(_out, _ex2);
			}
				break;
			}
			case 10: // list_threshold_monitors
			{
			try
			{
				int[] _arg0=PMIRPConstDefs.MonitorIdListHelper.read(_input);
				PMIRPConstDefs.MonitorInfoListHolder _arg1= new PMIRPConstDefs.MonitorInfoListHolder();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,list_threshold_monitors(_arg0,_arg1));
				PMIRPConstDefs.MonitorInfoListHelper.write(_out,_arg1.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.ListThresholdMonitors _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ListThresholdMonitorsHelper.write(_out, _ex2);
			}
				break;
			}
			case 11: // create_threshold_monitor
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				java.lang.String[] _arg1=PMIRPConstDefs.MOInstanceListHelper.read(_input);
				PMIRPConstDefs.ThresholdInfo[] _arg2=PMIRPConstDefs.ThresholdInfoListHelper.read(_input);
				int _arg3=_input.read_ulong();
				org.omg.CORBA.IntHolder _arg4= new org.omg.CORBA.IntHolder();
				PMIRPConstDefs.MUnsupportedListHolder _arg5= new PMIRPConstDefs.MUnsupportedListHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,create_threshold_monitor(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5));
				_out.write_ulong(_arg4.value);
				PMIRPConstDefs.MUnsupportedListHelper.write(_out,_arg5.value);
			}
			catch(PMIRPSystem.CreateThresholdMonitor _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.CreateThresholdMonitorHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 12: // suspend_threshold_monitor
			{
			try
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				PMIRPConstDefs.ResultHelper.write(_out,suspend_threshold_monitor(_arg0));
			}
			catch(PMIRPSystem.UnknownThresholdMonitor _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.UnknownThresholdMonitorHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(PMIRPSystem.ThresholdMonitorAlreadySuspended _ex2)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.ThresholdMonitorAlreadySuspendedHelper.write(_out, _ex2);
			}
			catch(PMIRPSystem.SuspendThresholdMonitor _ex3)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.SuspendThresholdMonitorHelper.write(_out, _ex3);
			}
				break;
			}
			case 13: // create_measurement_job
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				java.lang.String[] _arg1=PMIRPConstDefs.MOInstanceListHelper.read(_input);
				java.lang.String[] _arg2=PMIRPConstDefs.MeasurementCategoryListHelper.read(_input);
				int _arg3=_input.read_ulong();
				int _arg4=_input.read_ulong();
				PMIRPConstDefs.IRPTimeOpt _arg5=PMIRPConstDefs.IRPTimeOptHelper.read(_input);
				PMIRPConstDefs.IRPTimeOpt _arg6=PMIRPConstDefs.IRPTimeOptHelper.read(_input);
				PMIRPConstDefs.ScheduleOpt _arg7=PMIRPConstDefs.ScheduleOptHelper.read(_input);
				PMIRPConstDefs.JobPriorityOpt _arg8=PMIRPConstDefs.JobPriorityOptHelper.read(_input);
				org.omg.CORBA.IntHolder _arg9= new org.omg.CORBA.IntHolder();
				PMIRPConstDefs.JUnsupportedListHolder _arg10= new PMIRPConstDefs.JUnsupportedListHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,create_measurement_job(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10));
				_out.write_ulong(_arg9.value);
				PMIRPConstDefs.JUnsupportedListHelper.write(_out,_arg10.value);
			}
			catch(PMIRPSystem.CreateMeasurementJob _ex0)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.CreateMeasurementJobHelper.write(_out, _ex0);
			}
			catch(PMIRPSystem.HighWorkLoad _ex1)
			{
				_out = handler.createExceptionReply();
				PMIRPSystem.HighWorkLoadHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex2);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex3)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex3);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
